package com.hy.ruiji.common;

/**
 * 工具类
 */
public class Status {
    public static final Integer PASS=1;
    public static final Integer NOT_PASS=0; //员工账号状态
    public static final String PRE_PASSWORD="123456"; //员工初始密码
    public static final String SESSION_USER= "employee";//保存当前用户的key


    //基于theadLocal封装工具类，用来保存和获取当前用户的id
    //每一个线程单独保存自己的id
    private static ThreadLocal<Long> threadLocal=new ThreadLocal<>();
    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }
    public static Long getCurrentId(){
        return  threadLocal.get();
    }
}
